<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商品详情</title>
    <script src="../js/jquery-2.1.1.min.js"></script>
    <script src="../js/base.js"></script>
    <script src="../js/vue.min.js"></script>
    <script src="commodity_detail.js"></script>
    <link rel="stylesheet" href="../css/commodity.css">
</head>
<body>
<div id="commodity_detail">
    <br>
    <button class="button" onclick="go_commodity_list()">返回列表</button>
    <button class="button" onclick="go_commodity_mod()">修改</button>
    <hr>
    <div>
        <div class="commodity_line">
            <div class="left">商品名称</div>
            <div class="right">{{ commodity_detail.name }}</div>
        </div>
        <div class="commodity_line">
            <div class="left">商品分类</div>
            <div class="right">{{ commodity_detail.commodity_classification }}</div>
        </div>
        <div class="commodity_line">
            <div class="left">商品单价</div>
            <div class="right">{{ commodity_detail.price }}</div>
        </div>
        <div class="commodity_line">
            <div class="left">商品优惠</div>
            <div class="right">{{ commodity_detail.preferential }} </div>
        </div>
        <div class="commodity_line">
            <div class="left">属性</div>
            <div class="right">
                <span v-for="obj in commodity_detail.p">
                    <input type="radio" name="property" v-model="property"
                           :value="obj.property_id"><label>{{ obj.property }}</label>
                </span>
            </div>
        </div>
        <div class="commodity_line">
            <div class="left">属性值</div>
            <div class="right">
                <span v-for="obj in commodity_detail.p">
                    <span class="property_value" v-for="item in obj.v"
                          v-if="item.property_id==property">{{ item.value }}</span>
                </span>
            </div>
        </div>
    </div>
</div>

</body>
</html>